home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / tcega.arc / GPWINDOW.C < prev    next >
Text File  |  1986-02-22  |  976b  |  42 lines

  1. /*                                                                            */
  2. /*      EGA Graphic Primitive for Turbo Pascal 3.01A, Version 01FEB86.        */
  3. /*      (C) 1986 by Kent Cedola, 2015 Meadow Lake Ct., Norfolk, VA, 23518     */
  4. /*                                                                            */
  5. /*      Description: Set the current window coordinates.                      */
  6. /*                                                                            */
  7.  
  8. void GPWINDOW(x1,y1,x2,y2)
  9.   int  x1,y1,x2,y2;
  10. {
  11.   extern int  GDWD_X1,GDWD_X2,GDWD_X3;
  12.   extern int  GDWD_Y1,GDWD_Y2,GDWD_Y3;
  13.   extern char GDW_FLG;
  14.  
  15.   register i;
  16.  
  17.   if (x1 > x2)
  18.     {
  19.       i  = x1;
  20.       x1 = x2;
  21.       x2 = i;
  22.     };
  23.  
  24.   if (y1 > y2)
  25.     {
  26.       i  = y1;
  27.       y1 = y2;
  28.       y2 = i;
  29.     };
  30.  
  31.   GDWD_X1 = x1;
  32.   GDWD_Y1 = y1;
  33.   GDWD_X2 = x2;
  34.   GDWD_Y2 = y2;
  35.  
  36.   GDWD_X3 = x2 - x1 + 1;
  37.   GDWD_Y3 = y2 - y1 + 1;
  38.  
  39.   GDW_FLG = 1;
  40.  
  41. };
  42.